<div id="detail">
        <!-- {{ info }} -->

        <div class="top container-fluid">
          <div class="row container">
            <div class="col-lg-6 col-md-6 col-sm-6 pic">
              <a href="#" title="查看大图" data-toggle="modal" data-target="#myPic"><i class="fa fa-arrows-alt"></i></a>
              <div id="store-pic" class="carousel slide" data-ride="carousel">
                <!-- Indicators -->
                <!-- <ol class="carousel-indicators">
                  <li data-target="#store-pic" data-slide-to="0" class="active"></li>
                  <li data-target="#store-pic" data-slide-to="1"></li>
                </ol> -->

                <!-- Wrapper for slides -->
                <div class="carousel-inner detail-img-height" role="listbox">
                    {{ each info.images data index }}
                    {{ if index == 0}}
                    <div class="item active">
                      <img src="{{ data | watermark}}" alt="...">
                    </div>
                    {{ else }}
                    <div class="item">
                      <img src="{{ data | watermark}}" alt="...">
                    </div>
                    {{ /if }}
                    {{ /each}}

                </div>

                <!-- Controls -->
                <a class="left carousel-control" href="#store-pic" role="button" data-slide="prev">
                  <span class="glyphicon glyphicon-chevron-left fa fa-angle-left"></span>
                  <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#store-pic" role="button" data-slide="next">
                  <span class="glyphicon glyphicon-chevron-right fa fa-angle-right"></span>
                  <span class="sr-only">Next</span>
                </a>
              </div>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 brief">
              <h3 class="tit">
                {{ if info.infoType == 'Attorn' }}
                <small>转让</small>
                {{ else if info.infoType == 'SeekLease' }}
                <small>求租</small>
                {{ /if }}
                <strong>{{info.title}}</strong>
              </h3>
              <ul class="list-inline do">
                <!-- <li>编号：<span>3809</span></li> -->
                <li>已被浏览：<span>{{ info.viewCount }}</span>次</li>
                <li class="text-right">
                    {{ if userinfo }}
                       {{ if userinfo.pub &&  userinfo.pub.toString().indexOf(info._id.toString()) != -1 }}
                           <span data-pid="{{@ info._id}}"><i class="fa fa-heart"></i>已收藏</span>
                           {{ else }}
                           <span class="follow-message" data-pid="{{@ info._id}}"><i class="fa fa-heart-o"></i>收藏</span>
                       {{ /if }}
                       {{ else }}
                      <a href="/{{site.subDomain}}/signin"><span><i class="fa fa-heart-o"></i>收藏</span></a>

                    {{ /if }}
                  <!-- <span><i class="fa fa-star"></i>已收藏</span> -->
                  <a class="detail-exchange" data-pid="{{@ info._id }}" href="javascript:;"><i class="fa fa-exchange"></i>加入对比</a>
                </li>
              </ul>
              <div class="price row">
                <div class="col-lg-7 col-md-7 col-xs-7">
                  <dl class="dl-horizontal">
                    <dt>租　金 : </dt>
                    <dd>
                        {{ if info.estate.rental.max }}
                        <strong>{{ info.estate.rental.max }}</strong>
                        {{ else }}
                        <strong>{{ info.estate.rental }}</strong>
                        {{ /if }}
                        元/月
                    </dd>
                    <dt>转让费 : </dt>
                    <dd>
                        {{ if info.estate.transferFee.max }}
                        <strong>{{ info.estate.transferFee.max }}</strong>
                        {{ else }}
                        <strong>{{ info.estate.transferFee }}</strong>
                        {{ /if }}万元
                    </dd>
                  </dl>
                </div>
                <div class="col-lg-5 col-md-5 col-xs-5 size">
                  <small>店铺面积</small>
                  {{ if info.estate.area.max }}
                  <strong>{{ info.estate.area.max }}</strong><span>m<sup>2</sup></span>
                  {{ else }}
                  <strong>{{ info.estate.area }}</strong><span>m<sup>2</sup></span>
                  {{ /if }}
                </div>
              </div>
              <dl class="dl-horizontal">
                <dt>区域商圈 : </dt>
                <dd>
                    <a href="#">{{ info.estate.district }}</a>
                    <a href="#">{{ info.estate.shopArea }}</a>
                    <span>{{ info.estate.subway }}</span>
                </dd>
                <dt>商铺类型 : </dt>
                <dd>{{ info.estate.type }}</dd>
                <dt>行业业务 : </dt>
                <dd>
                    <span>{{ info.category }}</span>
                    <!-- <span>面包店</span> -->
                </dd>
                <dt>营业状态 : </dt>
                <dd>
                    {{ if info.estate.isOperating == true }}
                    营业中
                    {{ else }}
                    未营业
                    {{ /if }}


                    <span class="label label-theme">

                    {{ if info.estate.canEmptyAttorn == true }}

                    可空转
                    {{ else }}
                    不可空转
                    {{ /if }}
                </span></dd>
                <dt>转让状态 : </dt>
                <dd>
                    <span class="label label-theme">
                    {{ if info.isTraded == true }}
                    已成交
                    {{ else }}
                    未成交
                    {{ /if }}
                </span></dd>
              </dl>
              <div class="tel media">
                  {{ if info.estate.isPreference == true }}
                  <div class="media-left media-middle">
                    <span class="att ok"><i class="fa fa-check"></i>腾铺认证信息</span>
                  </div>
                  {{ /if }}

                <div class="media-body media-middle">
                  <p>经纪人<strong>{{ info.contact.phone }}</strong></p>
                  <small>联系我时，请说明是在腾铺网看到的，谢谢！</small>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="review container">
          <h4 class="text-center"><strong>商铺简介</strong></h4>
          <div class="con">
            <p>{{# info.content }}</p>
          </div>
        </div>
        <!-- <div class="review container">
          <h4 class="text-center"><strong>腾铺点评</strong></h4>
          <div class="con">
            <p>根据学校发展需要移址，现有苏州市吴江区一所非学历教育培训机构转让原校区，执照齐全，面积1000平方米，豪华装修（目前相对高端）9成新。</p>
            <p>1.有独立沿街门面进校区。配备日本进口自动门，全套考勤和出入系统。带有2台挂式电脑进行校区信息显示。</p>
            <p>2.独立的家长休闲等候区，德国德龙全自动咖啡机，一体化定制沙发，12台ipad包含定制游戏供学生等候时使用。3台台式电脑提供给家长实时资讯查询。</p>
          </div>
        </div> -->






        <a href="/{{ site.subDomain }}/radio" class="btn btn-match ratio" target="_blank"><i>3</i>对比</a>
      </div>


      <div class="fav">
        <h4 class="text-center"><strong><i class="fa fa-heart-o"></i>猜你喜欢</strong></h4>
        <div id="choose" class="index-choose container">
          <div class="list row">
            {{ each info.adsenses.Detail data index }}
            <div class="col-lg-4 col-md-4">

              <div class="item-store pic">
                <div class="point">优选</div>
                <img src="{{ data.images[0] | watermark}}" alt="">
                <div class="con">
                  <a href="/{{ site.subDomain }}/detail/{{data._id.toString()}}">
                     <div class="tit"><strong>{{ data.title }}</strong></div>
                  </a>
                  <dl>
                    <dt>[转让]</dt>
                    <dd>{{ data.estate.district }} {{ data.estate.shopArea }}</dd>
                    <dd><strong>{{ data.estate.area }}</strong>m<sup name="">2</sup></dd>
                    <dd><strong>{{ data.estate.rental }}</strong>元/月</dd>
                  </dl>
                </div>
              </div>
              <div class="con">
                  {{ each info.adsenses.DetailSm sdata sindex }}
                  {{ if sindex%3 == index%3 }}
                    <div class="item-store media">
                      <div class="media-left">
                        <div class="point sm">优选</div>
                        <!-- <div style="width:100px;height:75px;overfllow:hidden;">
                            <img style="width:100%;height:auto;" src="{{ sdata.images[0] }}" alt="">
                        </div> -->
                        <div>
                            <img src="{{ sdata.images[0] }}" alt="">
                        </div>
                      </div>
                      <div class="media-body">
                        <a href="/{{ site.subDomain }}/detail/{{sdata._id.toString()}}">
                            <h4 class="media-heading"><strong>{{ sdata.title }}</strong></h4>
                        </a>
                        <p>
                          <strong>[转让]</strong>
                          <span>{{ sdata.estate.district }} {{ sdata.estate.shopArea }}</span>
                          <span>{{ sdata.estate.type }}</span>
                        </p>
                        <p>
                          <span><strong>{{ sdata.estate.area }}</strong>m<sup name="">2</sup></span>
                          <span><strong>{{ sdata.estate.rental }}</strong>元/月</span>
                        </p>
                      </div>
                    </div>
                {{ /if }}
                {{ /each }}
              </div>
            </div>
            {{ /each}}

          </div>
        </div>
      </div>

      <!-- BigPic -->
      <div class="modal fade" id="myPic" tabindex="-1" role="dialog" aria-labelledby="myPicLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-body">
              <div id="big-pic" class="carousel slide center-block" data-ride="carousel">
                <!-- Wrapper for slides -->

                <div class="carousel-inner big-detail-img" role="listbox">
                    {{ each info.images data index }}
                    {{ if index == 0}}
                    <div class="item active center-block">
                      <img src="{{ data | watermark}}" alt="...">
                    </div>
                    {{ else }}
                    <div class="item center-block">
                      <img src="{{ data | watermark}}" alt="...">
                    </div>
                    {{ /if }}
                    {{ /each}}
                </div>

                <!-- Controls -->
                <a class="left carousel-control" href="#big-pic" role="button" data-slide="prev">
                  <span class="glyphicon glyphicon-chevron-left fa fa-angle-left"></span>
                  <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#big-pic" role="button" data-slide="next">
                  <span class="glyphicon glyphicon-chevron-right fa fa-angle-right"></span>
                  <span class="sr-only">Next</span>
                </a>
              </div>
            </div>
            <!-- <div class="modal-footer">
              1/3
            </div> -->
          </div>

        </div>
      <script>
          var pubContent = $('#detail');
          var site = '{{ site.subDomain }}';
          console.log(site)
          var exchangeArr = JSON.parse(localStorage.getItem('exchange'))?JSON.parse(localStorage.getItem('exchange')):[];
          $('.ratio i').html(exchangeArr.length);
          $('.ratio').attr('href','/'+site+'/ratio?query='+exchangeArr);
          pubContent.on('click','a.detail-exchange',function(){
              var pid = $(this).data('pid');
              console.log(exchangeArr);
              if (exchangeArr.indexOf(pid) === -1) {
                  if (exchangeArr.length < 3) {
                      exchangeArr.push(pid);
                      localStorage.setItem('exchange',JSON.stringify(exchangeArr));
                      $('.ratio i').html(exchangeArr.length);
                      $('.ratio').attr('href','/ratio?query='+exchangeArr);
                  } else {
                      bootbox.alert({
                          size: 'smal',
                          message: "对比栏已经满栏哦"
                      });
                  }
              } else {
                  bootbox.alert({
                      size: 'smal',
                      message: "已经加入过对比栏了哦"
                  });
              }

              console.log($(this).data('pid'))
          })

          var $followMessage = $('.follow-message');
          $followMessage.on('click',function(){
              var self = this;
              followMessage(self);
          });
          function followWatch(self){
              var pid = $(self).data('pid');
              $.ajax({
                  type: "put",
                  contentType: "application/json",
                  url: SITE_ADDR + "/info/"+pid+"/watch",
                  success: function (data, textStatus) {
                      followMessage(self);
                  },
                  complete: function (XMLHttpRequest, textStatus) {
                      submiting = false;
                  }
              });
          }
          function followMessage(self){
              var pid = $(self).data('pid');
              var uid = loginUser._id;
              $.ajax({
                  type: "put",
                  contentType: "application/json",
                  url: SITE_ADDR+"/user/"+pid+"/"+uid+"/collection",
                  success: function (data, textStatus) {
                      if (data.ok) {
                          $(self).find('i').removeClass('fa-heart-o')
                          $(self).find('i').addClass('fa-heart')
                      }
                      else {
                          bootbox.alert('抱歉服务器出问题啦');
                      }
                  },
                  complete: function (XMLHttpRequest, textStatus) {
                      submiting = false;
                  }
              });
          }
      </script>
